package com.daxt.controller.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.daxt.common.annotations.LoginAuth;
import com.daxt.common.result.PageInfo;
import com.daxt.common.result.Result;
import com.daxt.common.result.ResultUtil;
import com.daxt.mapper.sys.RsaMapper;
import com.daxt.model.service.base.vo.Role;
import com.daxt.model.service.base.vo.Rsa;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "RSA")
@RestController
public class RsaController {

    @Autowired
    private RsaMapper rsaMapper;

    @ApiOperation(value = "获取公钥", notes = "")
    @GetMapping("/rsa")
    public Result<String> getPublicKey(){

        Rsa rsa = rsaMapper.selectById("1");
        String publicKey=rsa.getPublicKey();
        return ResultUtil.success(null,publicKey);

    }

}
